<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div>
    <#include "fragments/header.ftl"/>
</div>
<#if message??>
    <h2>${message}</h2>
</#if>
<div>
    <form method="POST" enctype="multipart/form-data" action="/view/upload">
        <table>
            <tr>
                <td>文件上传:</td>
                <td><input type="file" name="filename"/></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" value="上传"/></td>
            </tr>
        </table>
    </form>
</div>

<div>
    <table border="1">
        <thead>
        <tr>

            <td>Name(名称)</td>
            <td>ID（编号）</td>
            <td>contentType（内容类型）</td>
            <td>size（大小 单位：bytes）</td>
            <td>uploadDate（上传时间）</td>
            <td>md5（摘要信息）</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
            <#list files as file >
            <tr>
                <td><a href="/view/file?id=${file.id!''}&method=download">${file.name!''}</a></td>
                <td>${file.id!''}</td>
                <td>${file.contentType!''}</td>
                <td>${file.size!''}</td>
                <td>${file.uploadDate}</td>
                <td>${file.md5!''}</td>
                <td>
                    <a href="/view/file?id=${file.id!''}&method=show" target="_blank">查看</a>
                    <a href="/view/file?id=${file.id!''}&method=delete">删除</a>
                </td>
            </tr>
            <#else>
                <tr>
                    <td colspan="3">没有文件信息！！</td>
                </tr>
            </#list>
        </tbody>
    </table>
</div>
<div>
    <#include "fragments/footer.ftl"/>
</div>
</body>
</html>
